<template>
  <div class="hello">
      当前值为：<el-tag type="danger">{{$store.state.count}}</el-tag>
    <el-button @click="add">+1</el-button>
    {{$store.getters.eventOll}}
    子组件:<son :childCom="childCom" @showbox="toshow"></son>
    子向父组件的值：{{msg}}
  </div>
</template>

<script>
import son from "./Son"
export default {
  data(){
    return{
       childCom:"父组件数据",
       msg:''
    }
  },
  methods:{
    add(){
      this.$store.commit('inmutations',10)
    },
     toshow(msg) {
        this.msg = msg;
    }
    
  },
  components:{
      son
  },
  mounted(){
      this.$store.dispatch("getactions")
  },
}

</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>

</style>
